package com.gs.service.passenger;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.gs.dao.PassengerDao;
import com.gs.pojo.Attribute;
import com.gs.pojo.Passenger;
@Service("passengerService")
public class PassengerServiceImpl implements PassengerService{
	
	@Resource
	private PassengerDao  passengerDao;

	public List<Passenger> selectAjaxList(String name) {
		return passengerDao.selectAjaxList(name);
	}

	public Passenger selectById(Integer id) {
		return passengerDao.selectById(id);
	}

	public int insertAll(Passenger passenger) {
		return passengerDao.insertAll(passenger);
	}

	@Override
	public int updateById(Passenger passenger) {
		return passengerDao.updateById(passenger);
	}

	/**
	 * 查询旅客数量
	 */
	@Override
	public long PassengerCount(String txtname) {
		return passengerDao.PassengerCount(txtname);
	}
	/**
	 * 根据currentPage和pageSize分页查询旅客信息
	 * @param currentPage
	 * @param pageSize
	 * @return
	 */
	@Override
	public List<Passenger> PassengerList(String txtname,int currentPage, int pageSize) {
		return passengerDao.PassengerList(txtname,currentPage,pageSize);
	}
	/**
	 * 通过属性明细ID查询字典中的属性明细名称
	 * @param genderID
	 * @return
	 */
	@Override
	public String getInformationById(Integer ID) {
		return passengerDao.getInformationById(ID);
	}
	/**
	 * 通过属性ID获得属性类
	 * @param attributeID
	 * @return
	 */
	@Override
	public List<Attribute> getAttributeByAttributeID(int attributeID) {
		return passengerDao.getAttributeByAttributeID(attributeID);
	}
	/**
	 * 添加旅客信息
	 * @param passenger
	 * @return
	 */
	@Override
	public int addPassenger(Passenger passenger) {
		return passengerDao.addPassenger(passenger);
	}
	/**
	 * 验证身份证信息
	 * @param papersNumber
	 * @return
	 */
	@Override
	public Integer YZ(String papersNumber) {
		return passengerDao.YZ(papersNumber);
	}
	/**
	 * 根据id查询旅客信息
	 * @param id
	 * @return
	 */
	@Override
	public Passenger getPassengerByID(Integer id) {
		return passengerDao.getPassengerByID(id);
	}
	/**
	 * 修改旅客信息
	 * @param passenger
	 * @return
	 */
	@Override
	public Integer updatePassenger(Passenger passenger) {
		return passengerDao.updatePassenger(passenger);
	}
	/**
	 * 删除旅客信息
	 * @param id
	 * @return
	 */
	@Override
	public Integer delPassengerByID(Integer id) {
		return passengerDao.delPassengerByID(id);
	}
}
